package com.summerbird.mallchat.common.chat.strategy.mark;

import com.summerbird.mallchat.common.chat.domain.enums.MessageMarkTypeEnum;
import org.springframework.stereotype.Component;

/**
 * 点赞标记策略类
 */
@Component
public class LikeStrategy extends AbstractMsgMarkStrategy{
    @Override
    protected void doMark(Long uid, Long msgId) {
        super.doMark(uid, msgId);
        // 同时点击取消点踩操作
        MsgMarkFactory.getStrategyOrNull(MessageMarkTypeEnum.DISLIKE.getType()).unMark(uid, msgId);
    }

    @Override
    protected MessageMarkTypeEnum getTypeEnum() {
        return MessageMarkTypeEnum.LIKE;
    }
}
